-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a dependency check for cadence imports #5908
Conversation
what is the use case for this ? |
There is a desire on testnet to report and potentially fail transactions that use unstaged contracts, to remind people that their contracts are not staged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the idea to consult the contract update staging contract and check that for all dependencies a contract has been staged?
5d0fdaf
to
395d26a
Compare
yes exactly. That part will be implemented in the smart contract, which gives us greater flexibility and means that we do not have to use HCU to deploy changes. |
ref: #5858
Add a dependency check to the FVM code.
If enabled the FVM will expect a function with the following signature:
The FVM will call this function at the end of the transaction (after fee deduction). It will inject all dependencies of the transaction and all the authorizers of the transaction + the payer. The call of the function is not metered.
If the function is not there the FVM will quietly continue (It will log the problem).
If the function panics the transaction will fail (the panic message will be in the error). The function can emit events (but they will only be emitted if the transaction doesn't fail).
This is a v0.33 only feature